package com.sinosoft.utils;

/**
 * @Author: WangShengJie
 * @Date: 2025/3/14
 */
public class AddressMain {
    public static void main(String[] args) {
        String address = "@@北京市朝阳";
        String ddress1 = "北京市朝阳区双井乐橙中心";
        String ddress2 = "@@@";


        String lastAddress = address.substring(address.lastIndexOf("@")+1);
        System.out.println(lastAddress);

        if (!(ddress1.lastIndexOf("@") < 0)) {
            String lastAddress1 = ddress1.substring(ddress1.lastIndexOf("@")+1);
            System.out.println(lastAddress1);

        }


        System.out.println("-----------------");

        String lastAddress2 = ddress2.substring(ddress2.lastIndexOf("@")+1);
        System.out.println(lastAddress2);
        System.out.println("-----------------");
    }
}
